<?php

function startSession() {

   if (!session_id()) {
      @session_start();
   }

}
/* NOTIFICATIONS */
function addNotification($message,$type="info")
    {
	 $message_after_redirect = "";
	 if (isset($_SESSION['MESSAGE_AFTER_REDIRECT'])) $message_after_redirect = $_SESSION['MESSAGE_AFTER_REDIRECT'];
	 $message_after_redirect .=
	  "<script>
	      $(function(){		   
		  $.easyNotification({
		      id : '$type',
		      text : '$message'
		  });
	      });
	  </script>";
	  
	  $_SESSION['MESSAGE_AFTER_REDIRECT'] = $message_after_redirect;
	
       
    }
function showNotifications()
{
    if (isset($_SESSION['MESSAGE_AFTER_REDIRECT']))
    {
        echo $_SESSION['MESSAGE_AFTER_REDIRECT'];
        $_SESSION['MESSAGE_AFTER_REDIRECT'] = ''; //Clean notifications
    }
    
}
/** FIN NOTIFICATIONS **/





?>